var util = require("../../../../utils/util.js"),
{api} = require("../../../../utils/api.js"),
app = getApp();
Page({

    data: {
        czIntegral: [],
        xfIntegral: [],
        statusFlag: 4,
        showEmpty: !1,
        tearoomIndex:1,
        amount:0,
        show:false,
        record:{},
        userInfo:{},
        configInfo:{},
    },
    onClickHide(){
        this.setData({show:false})
    },
    showModel(){
        this.setData({show:true})
    },
    onLoad: function(a) {
        this.getUsers()
        this.integralList()
    },
    async getUsers(){
        const data = await app.getUsers();
        data && this.setData(data)
    },
    async integralList(){
        var parmes = {
            page: this.data.page,
            pageSize:this.data.pageSize,
            operate_type:this.data.tearoomIndex
        };
        let {data:{xfIntegral,czIntegral}}=await api.integralSignList(parmes);
        this.setData({xfIntegral,czIntegral})
    },
    changeTab(e){
        this.setData({tearoomIndex:e.currentTarget.dataset.flag})
    },
    onShareAppMessage(e) {
        return util.shareEvent(e)
      }
})